﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.Web.coffinegurunaru.AppLogic.Page;
using Com.Framework;
using Com.Library.DB.Board;

namespace Com.Web.coffinegurunaru.manager.board
{
    public partial class article : ManagerPage
    {
        public int BoardSN { get; set; }
		public string BoardJsonData { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            BoardSN = Request["boardSN"].Parse((int)0);

            if (BoardSN == 1)
                if (boardMenu != null)
                    boardMenu.MenuIdx = 2;

            if (BoardSN == 2)
                if (boardMenu != null)
                    boardMenu.MenuIdx = 3;

			if (BoardSN == 3)
				if (boardMenu != null)
					boardMenu.MenuIdx = 4;

			if (BoardSN == 4)
				if (boardMenu != null)
					boardMenu.MenuIdx = 5;

			int cntTotal = 0;
			List<BoardEntity> boards = BoardModel.GetList(1, 255, out cntTotal);

			BoardEntity board = boards.Find(delegate(BoardEntity item) { return item.n1BoardSN == BoardSN; });

			if (board != null)
				BoardJsonData = board.strJsonData;
		}
    }
}
